using System.Diagnostics.CodeAnalysis;
using Digitalmes.Domain.SeedWork;
using SqlSugar;

namespace Digitalmes.Infrastructure.IntegrationTests.Models;

/// <summary>
/// 产品
/// </summary>
/// <remarks>
/// MySQL: 
/// <code>
/// DROP TABLE IF EXISTS `my_product`;
/// CREATE TABLE `my_product` (
///   `Id` 					    bigint(20) NOT NULL COMMENT 'Id',
///   `ProductName`			varchar(64) NOT NULL COMMENT '产品名称',
///   `ProductCode`			varchar(64) DEFAULT NULL COMMENT '产品代码',
///   `CreatedBy`			  varchar(64) DEFAULT NULL COMMENT '创建人',
///   `CreatedTime` 		datetime NOT NULL COMMENT '创建时间',
///   `UpdatedBy` 			varchar(64) DEFAULT NULL COMMENT '修改人',
///   `UpdatedTime` 		datetime DEFAULT NULL COMMENT '修改时间',
///   PRIMARY KEY(`Id`)
/// ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT = DYNAMIC COMMENT='产品表';
/// </code>
/// </remarks>
[SugarTable("my_product")]
public sealed class MyProduct : AuditedEntity
{
    [NotNull]
    public string? ProductName { get; set; }

    [NotNull]
    public string? ProductCode { get; set; }
}
